\(\int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx\) [65]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 14 \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=\frac {\text {arctanh}\left (\sqrt {2} x\right )}{\sqrt {2}} \]

[Out]

1/2*arctanh(x*2^(1/2))*2^(1/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {28, 21, 212} \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=\frac {\text {arctanh}\left (\sqrt {2} x\right )}{\sqrt {2}} \]

[In]

Int[(1 - 2*x^2)/(1 - 4*x^2 + 4*x^4),x]

[Out]

ArcTanh[Sqrt[2]*x]/Sqrt[2]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps \begin{align*} \text {integral}& = 4 \int \frac {1-2 x^2}{\left (-2+4 x^2\right )^2} \, dx \\ & = \int \frac {1}{1-2 x^2} \, dx \\ & = \frac {\tanh ^{-1}\left (\sqrt {2} x\right )}{\sqrt {2}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(32\) vs. \(2(14)=28\).

Time = 0.01 (sec) , antiderivative size = 32, normalized size of antiderivative = 2.29 \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=\frac {-\log \left (\sqrt {2}-2 x\right )+\log \left (\sqrt {2}+2 x\right )}{2 \sqrt {2}} \]

[In]

Integrate[(1 - 2*x^2)/(1 - 4*x^2 + 4*x^4),x]

[Out]

(-Log[Sqrt[2] - 2*x] + Log[Sqrt[2] + 2*x])/(2*Sqrt[2])

Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.86

method result size
default \(\frac {\operatorname {arctanh}\left (x \sqrt {2}\right ) \sqrt {2}}{2}\) \(12\)
risch \(\frac {\sqrt {2}\, \ln \left (2 x +\sqrt {2}\right )}{4}-\frac {\sqrt {2}\, \ln \left (2 x -\sqrt {2}\right )}{4}\) \(30\)

[In]

int((-2*x^2+1)/(4*x^4-4*x^2+1),x,method=_RETURNVERBOSE)

[Out]

1/2*arctanh(x*2^(1/2))*2^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (11) = 22\).

Time = 0.24 (sec) , antiderivative size = 29, normalized size of antiderivative = 2.07 \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=\frac {1}{4} \, \sqrt {2} \log \left (\frac {2 \, x^{2} + 2 \, \sqrt {2} x + 1}{2 \, x^{2} - 1}\right ) \]

[In]

integrate((-2*x^2+1)/(4*x^4-4*x^2+1),x, algorithm="fricas")

[Out]

1/4*sqrt(2)*log((2*x^2 + 2*sqrt(2)*x + 1)/(2*x^2 - 1))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (14) = 28\).

Time = 0.05 (sec) , antiderivative size = 32, normalized size of antiderivative = 2.29 \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=- \frac {\sqrt {2} \log {\left (x - \frac {\sqrt {2}}{2} \right )}}{4} + \frac {\sqrt {2} \log {\left (x + \frac {\sqrt {2}}{2} \right )}}{4} \]

[In]

integrate((-2*x**2+1)/(4*x**4-4*x**2+1),x)

[Out]

-sqrt(2)*log(x - sqrt(2)/2)/4 + sqrt(2)*log(x + sqrt(2)/2)/4

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 25 vs. \(2 (11) = 22\).

Time = 0.27 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.79 \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=-\frac {1}{4} \, \sqrt {2} \log \left (\frac {2 \, x - \sqrt {2}}{2 \, x + \sqrt {2}}\right ) \]

[In]

integrate((-2*x^2+1)/(4*x^4-4*x^2+1),x, algorithm="maxima")

[Out]

-1/4*sqrt(2)*log((2*x - sqrt(2))/(2*x + sqrt(2)))

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 29 vs. \(2 (11) = 22\).

Time = 0.28 (sec) , antiderivative size = 29, normalized size of antiderivative = 2.07 \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=\frac {1}{4} \, \sqrt {2} \log \left ({\left | x + \frac {1}{2} \, \sqrt {2} \right |}\right ) - \frac {1}{4} \, \sqrt {2} \log \left ({\left | x - \frac {1}{2} \, \sqrt {2} \right |}\right ) \]

[In]

integrate((-2*x^2+1)/(4*x^4-4*x^2+1),x, algorithm="giac")

[Out]

1/4*sqrt(2)*log(abs(x + 1/2*sqrt(2))) - 1/4*sqrt(2)*log(abs(x - 1/2*sqrt(2)))

Mupad [B] (verification not implemented)

Time = 13.37 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.79 \[ \int \frac {1-2 x^2}{1-4 x^2+4 x^4} \, dx=\frac {\sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,x\right )}{2} \]

[In]

int(-(2*x^2 - 1)/(4*x^4 - 4*x^2 + 1),x)

[Out]

(2^(1/2)*atanh(2^(1/2)*x))/2